package com.liferay;

import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.ProcessAction;
import javax.xml.namespace.QName;

import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.util.bridges.mvc.MVCPortlet;


public class EventSenderPortlet extends MVCPortlet {
	     
	    @ProcessAction(name="processEvent")
	    public void process(ActionRequest request, ActionResponse response) {
	         
	        /**
	         * Get sample text from UI
	         */
	         
	        String sampleText = ParamUtil.getString(request, "sampleText","");
	        //String sampleText1 = ParamUtil.getString(request, "sampleText1","");
	         
	        /**
	         * Refer portlet.xml
	         */
	        System.out.println("the text is sended "+sampleText);
	       // System.out.println("the text is sended"+sampleText1);
	        QName qName = new QName("http://liferay.com", "ipc-sender","x");
	        response.setEvent(qName, sampleText);
	       // response.setEvent(qName, sampleText1);
	        
	    }
}
